<!--{include control/admin/tpl/admin_header}-->
<div class="page_title">
  <h1>{$_lang['sms_internal_tpl_title']}</h1>
  <div class="tool">         
    <a href="{BASE_URL}/index.php/admin/config_msg/tpl"class="here"> {$_lang['sms_config']}</a>
    <a href="{BASE_URL}/index.php/admin/config_msg/tpl_add"> {$_lang['sms_tpl_config_edit']}</a>
  </div>
</div>
<div class="box list">
<div class="tab">
       <a href="{BASE_URL}/index.php/admin/config_msg/tpl" {if !$_GET['obj']} class="select"{/if}>{$_lang['all']}</a>
       {loop $message_send_obj $k $v}
	   		<a href="{BASE_URL}/index.php/admin/config_msg/tpl?obj={$k}" {if $_GET['obj']==$k} class="select"{/if}>{$v}</a>
	   {/loop}
</div>
<form name="frm_msg_tpl" action="{BASE_URL}/index.php/admin/config_msg/tpl" method="post">
	<input type="hidden" name="hdn_obj" value="{$_GET['obj']}">
    <table class="detail" border="0" cellspacing="0" cellpadding="0">
        <tr>
    		<th scope="row">{$_lang['config_num']}</th>
			<th scope="row">{$_lang['config_name']}</th>
			<th scope="row">{$_lang['basic_config']}</th>
			<th scope="row">{$_lang['operate']}</th>
        </tr>
		<tbody>
        	{loop $list_arr $k $v}
			<tr> 
				 <td scope="row">
                {$v['tpl_id']}
            	</td>
				<td>$v['desc']</td>
            <td> 
					<input type="hidden" name="hdn[{$v['tpl_id']}]" value="{$v['tpl_id']}">  
					{loop $message_send_type[0] $k2 $v2}
					<label for="cbk_{$k}_{$k2}">
						<input type="checkbox" id="cbk_{$k}_{$k2}" name="ckb[{$v['tpl_id']}][{$v2}]" value="1" {if $v[$v2]==1}checked="checked"{/if}>
						$message_send_type['1'][$v2]&nbsp;&nbsp;&nbsp;&nbsp;
					</label>
					{/loop}
					 
			</td>
			<td>
				<a href="{$add_uri}?tpl_id={$v['tpl_id']}">{$_lang['edit_tpl']}</a>
            </td>
        </tr>
		{/loop}
		</tbody>
	<tfoot>
	<tr>
	<td colspan="9">
	 <div class="page" >{$pages['page']}</div>
     <button class="positive primary pill button" type="submit" name='sbt_edit' value="{$_lang['submit']}"><span class="check icon"></span>{$_lang['submit']}</button>
    </td>
   </tr>
	 </tfoot>  	
    </table>
</form>
</div>
<script type="text/javascript">
		function hide_me(i){
			$("#show_send_type_"+i).hide();
		}
		function show_me(i){
			$("#show_send_type_"+i).css("display","inline");
		}
</script>
<!--{include control/admin/tpl/admin_footer}-->
